<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/hpp_c1_c2.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<%@ include file="/common/meta.jsp" %>
<title>VTC - Holistic Programme Planning - HPP</title>
<%@ include file="/common/css_js.jsp"%>

<script type="text/javascript">
	var iframeResize = function(){
		var targObj = self;
		var targWin = targObj.parent.document.getElementById("programmeIframe");
		var projectionTypeTable = document.getElementById("offeringCampusDiv");
		
		if(targWin != null) {
		
			var HeightValue = projectionTypeTable.scrollHeight+20;
			targWin.style.height = HeightValue + "px";
		}
		
	}

	$(document).ready(function() {
		iframeResize();
		$("#curriculumHourForm").validate();
	});

	
</script> 

</head>
<body style="background-color: transparent;">	

	<s:form name="curriculumHourForm" id="curriculumHourForm" 
	        action="curriculum-hour!save.action?no-decorate" method="post">  
    <s:hidden name="programmeId"></s:hidden>   
    
	<div class="sListBorder" id="offeringCampusDiv">
      <div class="sList">
     
	   <table cellspacing="0" cellpadding="0" border="0" width="100%" class="sTable">
              <tbody>
              <tr>
                <td style="width:100px" class="sTh">Year </td>
                <td class="sTh">Curriculum Hours</td>
              </tr>
	              
	          <s:if test="%{curriculumHours!=null&&curriculumHours.size()!=0}">
	             <s:iterator value="curriculumHours" var="curriculumHour" status="st">
	                           
	              <tr class="sRow2">
	                <td class="sCell">
	                	<s:property value="#curriculumHour.year"/>
	                	<input type="hidden" name="curriculumHours[${st.index}].year" value="${curriculumHour.year}"/>
	                	<input type="hidden" name="curriculumHours[${st.index}].id" value="${curriculumHour.id}" />
	                </td>
	                <td class="sCell rc">
	                	<input type="text" name="curriculumHours[${st.index}].hours" value="${curriculumHour.hours}" id="" class="inputText required number" min="0" max="2147483648"/>
	                </td>
	              </tr>
	              
	          	</s:iterator>
	          </s:if>    
          
            </tbody>
          </table>
      </div>

		<div class="btnSet btnSetTypeA">
		  <div class="left">
		  	<s:if test="canEdit">
		    <div class="button">
		      <div class="left">
		        <div class="right">
	 	    			<s:submit value="Save" cssClass="inputButton"></s:submit>
		        </div>
		      </div>
		    </div>
		    </s:if>
		  </div>
		</div>
		
	</div>		
 </s:form> 
    	
</body>
</html>   